<div class="container">
    <div>
        <h3>Users</h3>
    </div>
    <div>
        <a href="<?php echo $this->url('user', array('controller' => 'index', 'action'=>'add'));?>">Add User</a>

        <?php if (isset($users)) : ?>
        <table class="table">
            <thead>
            <tr>
                <th>Id</th>
                <th>First name</th>
                <th>Last name</th>
                <th></th>
            </tr>
            </thead>
        <?php foreach($users as $user): ?>
            <tbody>
            <tr>
                <td><?php echo $user->getId(); ?></td>
                <td><?php echo $user->getFirstName(); ?></td>
                <td><?php echo $user->getLastName(); ?></td>
                <td>
                    <a href="<?php echo $this->url('user/wildcard', array('controller' => 'home', 'action' =>'edit', 'id' => $user->getId()));?>">Edit</a> |
                    <a href="<?php echo $this->url('user/wildcard', array('controller' => 'home','action' => 'delete', 'id' => $user->getId()));?>">Delete</a>
                </td>
            </tr>
            </tbody>
        <?php endforeach; ?>
        </table>
        <?php endif; ?>
        </div>
         <div>
             <a href="<?php echo $this->url('user/wildcard', array('controller' => 'home','action' => 'addProject'));?>">Add Project</a>
        <h3>Projects</h3>
    </div>
    <div>

    <?php if (isset($projects)) : ?>
        <table class="table">
            <thead>
            <tr>
                <th>Id</th>
                <th>Title</th>
                <th>User</th>
                <th>Status</th>
                <th>Category</th>
                <th></th>
            </tr>
            </thead>
        <?php foreach($projects as $project): ?>
            <tbody>
            <tr>
                 <td><?php echo $project->getId(); ?></td>
                <td><?php echo $project->getTitle(); ?></td>                        
                <td><?php echo $project->getUsers()->getFirstName(); ?></td>
                <td><?php echo $project->getStatuses()->getStatus(); ?></td>
                <td><?php echo $project->getCategory()->getCategoryName(); ?></td>
                <td>
                    <a href="<?php echo $this->url('project/wildcard', array('controller' => 'index', 'action' =>'show', 'id' => $project->getId()));?>">Show</a> 

                </td>
            </tr>
            </tbody>
        <?php endforeach; ?>
        </table>
        <?php endif; ?>

          </div>
</div>


